
function setup(){
	var entryBox = $('#entryBox'); 
	entryBox.keyup(function(e) {
        if(e.keyCode == 13) { // ENTER
        	log("User: " + entryBox.val());
        	entryBox.val("");
        }
    });
}

function log(msg) {
	var logBox = $("#logBox"); 
	logBox.val(logBox.val() + msg + "\n");
	logBox.attr({ scrollTop: logBox.attr("scrollHeight") });
}